package cn.yuanqiao.web.controller.archive.appManager;

import cn.yuanqiao.archive.appManager.domain.YqdaFilePath;
import cn.yuanqiao.archive.appManager.service.IYqdaFilePathSerive;
import cn.yuanqiao.common.web.controller.BaseController;
import cn.yuanqiao.common.core.domain.AjaxResult;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/archive/yqdaFilePath")
public class YqdaFilePathController extends BaseController {
    @Autowired
    private IYqdaFilePathSerive yqdaFilePathSerive;

    @PostMapping("/history")
    public AjaxResult history(@RequestParam("categoryId") Long categoryId){
        YqdaFilePath filePath = new YqdaFilePath();
        filePath.setTenantCode(SecurityUtils.getTenantCode());
        filePath.setCategoryId(categoryId);
        filePath.setState(1);
        return AjaxResult.success(yqdaFilePathSerive.selectYqdaFilePathList(filePath));
    }

}
